<template>
  <div class="not-found-container">
    <div class="not-found-content">
      <div class="error-code">404</div>
      <h2>抱歉，页面不存在</h2>
      <p>您访问的页面可能已被删除、移动或暂时不可用</p>
      <div class="error-suggestions">
        <p>🔍 检查您输入的网址是否正确</p>
        <p>📱 尝试使用页面顶部的导航菜单</p>
        <p>↩️ 回到上一页或返回首页</p>
      </div>
      <router-link to="/" class="back-home-btn">
        返回首页
      </router-link>
    </div>
  </div>
</template>

<script setup lang="ts">
import { onMounted } from 'vue'

onMounted(() => {
  // 设置页面标题
  document.title = '页面不存在 - 微前端平台'
})
</script>

<style scoped>
.not-found-container {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 8px;
  padding: 24px;
}

.not-found-content {
  text-align: center;
  max-width: 500px;
  background: white;
  padding: 48px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.error-code {
  font-size: 7rem;
  font-weight: 700;
  color: #1890ff;
  margin-bottom: 24px;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.05);
}

.not-found-content h2 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 16px;
}

.not-found-content p {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 24px;
  line-height: 1.6;
}

.error-suggestions {
  margin: 32px 0;
  text-align: left;
}

.error-suggestions p {
  margin-bottom: 12px;
  font-size: 1rem;
  padding-left: 24px;
  position: relative;
}

.error-suggestions p::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
}

.back-home-btn {
  display: inline-block;
  background: #1890ff;
  color: white;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}

.back-home-btn:hover {
  background: #40a9ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

@media (max-width: 768px) {
  .error-code {
    font-size: 5rem;
  }

  .not-found-content {
    padding: 32px 24px;
  }

  .not-found-content h2 {
    font-size: 1.6rem;
  }
}
</style>